// /////////////////////////////////////////////////////////////////////////////
//
// Name:            asScriptProcessor.cpp
// Author:          Michael Bartsch (ZCCdark203)
//
// Desc :           Binds the ScriptProcessor class to AngelScript
//
// License:         Copyright (C) 2009 Michael Bartsch and Contributors
//
//                  This program is free software: you can redistribute it
//                  and/or modify it under the terms of the zlib/libpng License.
//                  See main.cpp for conditions of distribution and use.
//
// /////////////////////////////////////////////////////////////////////////////

// Include files
#include "asScriptProcessor.h"

#ifdef __COMPILE_WITH_ANGELSCRIPT__

#include "../ScriptHelper.h"
#include "../core/asAssetProcessor.h"

#include "../../assets/ScriptProcessor.h"

//! Binds the ScriptProcessor class to AngelScript.
void bindScriptProcessor(asIScriptEngine *engine)
{
    // Forward declarations.
    int r;

    // Bind ScriptProcessor class.
    r = engine->RegisterObjectType("ScriptProcessor", sizeof(ScriptProcessor), asOBJ_REF); assert(r >= 0);

    // Bind inherited functions.
    bindAssetProcessorBase<ScriptProcessor>(engine, "ScriptProcessor");

    // Set ScriptProcessor behaviour.
    r = engine->RegisterObjectMethod("ScriptProcessor", "ScriptProcessor& opAssign(const ScriptProcessor &in)",
                                     asFUNCTION(assignT<ScriptProcessor>), asCALL_CDECL_OBJFIRST); assert(r >= 0);

    // Bind ScriptProcessor class functions.
    r = engine->RegisterObjectMethod("ScriptProcessor", "Script@ getScript(const string &in)",
                                     asMETHOD(ScriptProcessor, getScript), asCALL_THISCALL); assert(r >= 0);
}

#endif // __COMPILE_WITH_ANGELSCRIPT__

// End of File

